home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!lll-winken!sun-barr!rutgers!aramis.rutgers.edu!mcgrew
- From: mcgrew@aramis.rutgers.edu (Charles Mcgrew)
- Newsgroups: comp.sources.sun
- Subject: v02i025: Contool 3.0, Part06/06
- Message-ID: <Sep.25.16.13.38.1990.25634@aramis.rutgers.edu>
- Date: 25 Sep 90 20:13:39 GMT
- Organization: Rutgers Univ., New Brunswick, N.J.
- Lines: 1940
- Approved: mcgrew@aramis.rutgers.edu
-
- Submitted-by: chuck@trantor.harris-atd.com (Chuck Musciano)
- Posting-number: Volume 2, Issue 25
- Archive-name: contool3.0/part06
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 6 (of 6)."
- # Contents: contool_ui.c
- # Wrapped by chuck@melmac on Fri Aug 17 10:00:54 1990
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'contool_ui.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'contool_ui.c'\"
- else
- echo shar: Extracting \"'contool_ui.c'\" \(40450 characters\)
- sed "s/^X//" >'contool_ui.c' <<'END_OF_FILE'
- X/*
- X * contool_ui.c - User interface object initialization functions.
- X * This file was generated by `gxv' from `contool.G'.
- X * DO NOT EDIT BY HAND.
- X */
- X
- X#include <stdio.h>
- X#include <sys/param.h>
- X#include <sys/types.h>
- X#include <xview/xview.h>
- X#include <xview/canvas.h>
- X#include <xview/icon_load.h>
- X#include <xview/panel.h>
- X#include <xview/scrollbar.h>
- X#include <xview/svrimage.h>
- X#include <xview/termsw.h>
- X#include <xview/text.h>
- X#include <xview/tty.h>
- X#include <xview/xv_xrect.h>
- X#include "contool_ui.h"
- X
- X/*
- X * Create object `file_menu' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_file_menu_create(ip, owner)
- X caddr_t *ip;
- X Xv_opaque owner;
- X{
- X extern Menu_item popup_load_config();
- X extern Menu_item popup_save_config();
- X extern Menu_item start_logging();
- X extern Menu_item stop_logging();
- X extern Menu_item print_messages();
- X Xv_opaque obj;
- X
- X obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_ITEM,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_STRING, "Load Configuration...",
- X MENU_GEN_PROC, popup_load_config,
- X NULL,
- X MENU_ITEM,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_STRING, "Save Configuration...",
- X MENU_GEN_PROC, popup_save_config,
- X NULL,
- X MENU_ITEM,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_STRING, "Start Logging",
- X MENU_GEN_PROC, start_logging,
- X NULL,
- X MENU_ITEM,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_STRING, "Stop Logging",
- X MENU_GEN_PROC, stop_logging,
- X NULL,
- X MENU_ITEM,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_STRING, "Print",
- X MENU_GEN_PROC, print_messages,
- X NULL,
- X MENU_DEFAULT, 2,
- X MENU_GEN_PIN_WINDOW, (Xv_opaque) ip[0], "File",
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `view_menu' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_view_menu_create(ip, owner)
- X caddr_t *ip;
- X Xv_opaque owner;
- X{
- X extern Menu_item become_console();
- X extern Menu_item clear_messages();
- X extern Menu_item reset_filter();
- X Xv_opaque obj;
- X
- X obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_ITEM,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_STRING, "Become Console",
- X MENU_GEN_PROC, become_console,
- X NULL,
- X MENU_ITEM,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_STRING, "Clear Messages",
- X MENU_GEN_PROC, clear_messages,
- X NULL,
- X MENU_ITEM,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_STRING, "Reset Filter",
- X MENU_GEN_PROC, reset_filter,
- X NULL,
- X MENU_DEFAULT, 2,
- X MENU_GEN_PIN_WINDOW, (Xv_opaque) ip[0], "View",
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `edit_menu' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_edit_menu_create(ip, owner)
- X caddr_t *ip;
- X Xv_opaque owner;
- X{
- X extern Menu_item edit_filters();
- X extern Menu_item edit_properties();
- X Xv_opaque obj;
- X
- X obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_ITEM,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_STRING, "Filters...",
- X MENU_GEN_PROC, edit_filters,
- X NULL,
- X MENU_ITEM,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_STRING, "Properties...",
- X MENU_GEN_PROC, edit_properties,
- X NULL,
- X MENU_DEFAULT, 2,
- X MENU_GEN_PIN_WINDOW, (Xv_opaque) ip[0], "Edit",
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `filter_insert_menu' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_filter_insert_menu_create(ip, owner)
- X caddr_t *ip;
- X Xv_opaque owner;
- X{
- X extern Menu filter_insert_handler();
- X extern Menu_item insert_at_top();
- X extern Menu_item insert_above();
- X extern Menu_item insert_below();
- X extern Menu_item insert_at_bottom();
- X Xv_opaque obj;
- X
- X obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_GEN_PROC, filter_insert_handler,
- X MENU_ITEM,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_STRING, "At top",
- X MENU_GEN_PROC, insert_at_top,
- X NULL,
- X MENU_ITEM,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_STRING, "Above selection",
- X MENU_GEN_PROC, insert_above,
- X NULL,
- X MENU_ITEM,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_STRING, "Below selection",
- X MENU_GEN_PROC, insert_below,
- X NULL,
- X MENU_ITEM,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_STRING, "At bottom",
- X MENU_GEN_PROC, insert_at_bottom,
- X NULL,
- X MENU_DEFAULT, 4,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `filter_edit_menu' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_filter_edit_menu_create(ip, owner)
- X caddr_t *ip;
- X Xv_opaque owner;
- X{
- X extern Menu filter_edit_handler();
- X extern Menu_item filter_cut();
- X extern Menu_item filter_copy();
- X extern Menu_item filter_paste();
- X extern Menu_item filter_delete();
- X Xv_opaque obj;
- X
- X obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_GEN_PROC, filter_edit_handler,
- X MENU_ITEM,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_STRING, "Cut",
- X MENU_GEN_PROC, filter_cut,
- X NULL,
- X MENU_ITEM,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_STRING, "Copy",
- X MENU_GEN_PROC, filter_copy,
- X NULL,
- X MENU_ITEM,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_STRING, "Paste",
- X MENU_GEN_PROC, filter_paste,
- X MENU_PULLRIGHT, contool_filter_paste_menu_create(ip, NULL),
- X NULL,
- X MENU_ITEM,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_STRING, "Delete",
- X MENU_GEN_PROC, filter_delete,
- X NULL,
- X MENU_DEFAULT, 1,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `filter_paste_menu' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_filter_paste_menu_create(ip, owner)
- X caddr_t *ip;
- X Xv_opaque owner;
- X{
- X extern Menu_item paste_at_top();
- X extern Menu_item paste_above();
- X extern Menu_item paste_below();
- X extern Menu_item paste_at_bottom();
- X Xv_opaque obj;
- X
- X obj = xv_create(XV_NULL, MENU_COMMAND_MENU,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_ITEM,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_STRING, "At top",
- X MENU_GEN_PROC, paste_at_top,
- X NULL,
- X MENU_ITEM,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_STRING, "Above selection",
- X MENU_GEN_PROC, paste_above,
- X NULL,
- X MENU_ITEM,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_STRING, "Below selection",
- X MENU_GEN_PROC, paste_below,
- X NULL,
- X MENU_ITEM,
- X XV_KEY_DATA, INSTANCE, ip,
- X MENU_STRING, "At bottom",
- X MENU_GEN_PROC, paste_at_bottom,
- X NULL,
- X MENU_DEFAULT, 4,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Initialize an instance of object `base'.
- X */
- Xcontool_base_objects *
- Xcontool_base_objects_initialize(ip, owner)
- X contool_base_objects *ip;
- X Xv_opaque owner;
- X{
- X if (!ip && !(ip = (contool_base_objects *) calloc(1, sizeof (contool_base_objects))))
- X return (contool_base_objects *) NULL;
- X if (!ip->base)
- X ip->base = contool_base_base_create(ip, owner);
- X if (!ip->contool_controls)
- X ip->contool_controls = contool_base_contool_controls_create(ip, ip->base);
- X if (!ip->file)
- X ip->file = contool_base_file_create(ip, ip->contool_controls);
- X if (!ip->view)
- X ip->view = contool_base_view_create(ip, ip->contool_controls);
- X if (!ip->edit)
- X ip->edit = contool_base_edit_create(ip, ip->contool_controls);
- X if (!ip->display)
- X ip->display = contool_base_display_create(ip, ip->base);
- X return ip;
- X}
- X
- X/*
- X * Create object `base' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_base_base_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, FRAME,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_WIDTH, 575,
- X XV_HEIGHT, 246,
- X XV_LABEL, "Contool 3.0",
- X FRAME_CLOSED, FALSE,
- X FRAME_SHOW_FOOTER, TRUE,
- X FRAME_SHOW_RESIZE_CORNER, TRUE,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `contool_controls' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_base_contool_controls_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:contool_controls",
- X XV_X, 0,
- X XV_Y, 0,
- X XV_WIDTH, WIN_EXTEND_TO_EDGE,
- X XV_HEIGHT, 32,
- X WIN_BORDER, FALSE,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `file' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_base_file_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_BUTTON,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:file",
- X XV_X, 4,
- X XV_Y, 4,
- X XV_WIDTH, 54,
- X XV_HEIGHT, 20,
- X PANEL_LABEL_STRING, "File",
- X PANEL_ITEM_MENU, contool_file_menu_create((caddr_t *) ip, NULL),
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `view' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_base_view_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_BUTTON,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:view",
- X XV_X, 67,
- X XV_Y, 4,
- X XV_WIDTH, 62,
- X XV_HEIGHT, 20,
- X PANEL_LABEL_STRING, "View",
- X PANEL_ITEM_MENU, contool_view_menu_create((caddr_t *) ip, NULL),
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `edit' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_base_edit_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_BUTTON,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:edit",
- X XV_X, 138,
- X XV_Y, 4,
- X XV_WIDTH, 56,
- X XV_HEIGHT, 20,
- X PANEL_LABEL_STRING, "Edit",
- X PANEL_ITEM_MENU, contool_edit_menu_create((caddr_t *) ip, NULL),
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `display' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_base_display_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, TEXTSW,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:display",
- X XV_X, 0,
- X XV_Y, 27,
- X XV_WIDTH, WIN_EXTEND_TO_EDGE,
- X XV_HEIGHT, WIN_EXTEND_TO_EDGE,
- X OPENWIN_SHOW_BORDERS, TRUE,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Initialize an instance of object `props'.
- X */
- Xcontool_props_objects *
- Xcontool_props_objects_initialize(ip, owner)
- X contool_props_objects *ip;
- X Xv_opaque owner;
- X{
- X if (!ip && !(ip = (contool_props_objects *) calloc(1, sizeof (contool_props_objects))))
- X return (contool_props_objects *) NULL;
- X if (!ip->props)
- X ip->props = contool_props_props_create(ip, owner);
- X if (!ip->prop_controls)
- X ip->prop_controls = contool_props_prop_controls_create(ip, ip->props);
- X if (!ip->default_action)
- X ip->default_action = contool_props_default_action_create(ip, ip->prop_controls);
- X if (!ip->default_beep_count)
- X ip->default_beep_count = contool_props_default_beep_count_create(ip, ip->prop_controls);
- X if (!ip->default_beep_times)
- X ip->default_beep_times = contool_props_default_beep_times_create(ip, ip->prop_controls);
- X if (!ip->default_command)
- X ip->default_command = contool_props_default_command_create(ip, ip->prop_controls);
- X if (!ip->log_file)
- X ip->log_file = contool_props_log_file_create(ip, ip->prop_controls);
- X if (!ip->log_style)
- X ip->log_style = contool_props_log_style_create(ip, ip->prop_controls);
- X if (!ip->print_filter)
- X ip->print_filter = contool_props_print_filter_create(ip, ip->prop_controls);
- X if (!ip->good_icon)
- X ip->good_icon = contool_props_good_icon_create(ip, ip->prop_controls);
- X if (!ip->bad_icon)
- X ip->bad_icon = contool_props_bad_icon_create(ip, ip->prop_controls);
- X if (!ip->flash_icon)
- X ip->flash_icon = contool_props_flash_icon_create(ip, ip->prop_controls);
- X if (!ip->stamp_resolution)
- X ip->stamp_resolution = contool_props_stamp_resolution_create(ip, ip->prop_controls);
- X if (!ip->message2)
- X ip->message2 = contool_props_message2_create(ip, ip->prop_controls);
- X if (!ip->max_message)
- X ip->max_message = contool_props_max_message_create(ip, ip->prop_controls);
- X if (!ip->message3)
- X ip->message3 = contool_props_message3_create(ip, ip->prop_controls);
- X if (!ip->delete_amount)
- X ip->delete_amount = contool_props_delete_amount_create(ip, ip->prop_controls);
- X if (!ip->message4)
- X ip->message4 = contool_props_message4_create(ip, ip->prop_controls);
- X if (!ip->props_apply)
- X ip->props_apply = contool_props_props_apply_create(ip, ip->prop_controls);
- X if (!ip->props_reset)
- X ip->props_reset = contool_props_props_reset_create(ip, ip->prop_controls);
- X return ip;
- X}
- X
- X/*
- X * Create object `props' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_props_props_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, FRAME_CMD,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_WIDTH, 500,
- X XV_HEIGHT, 479,
- X XV_LABEL, "Contool: Properties",
- X XV_SHOW, FALSE,
- X FRAME_SHOW_FOOTER, FALSE,
- X FRAME_SHOW_RESIZE_CORNER, FALSE,
- X FRAME_CMD_PUSHPIN_IN, FALSE,
- X NULL);
- X xv_set(xv_get(obj, FRAME_CMD_PANEL), WIN_SHOW, FALSE, NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `prop_controls' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_props_prop_controls_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:prop_controls",
- X XV_X, 0,
- X XV_Y, 0,
- X XV_WIDTH, WIN_EXTEND_TO_EDGE,
- X XV_HEIGHT, WIN_EXTEND_TO_EDGE,
- X WIN_BORDER, FALSE,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `default_action' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_props_default_action_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X extern int default_action();
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_TOGGLE,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:default_action",
- X XV_X, 96,
- X XV_Y, 14,
- X XV_WIDTH, 211,
- X XV_HEIGHT, 139,
- X PANEL_VALUE_X, 205,
- X PANEL_VALUE_Y, 14,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_CHOICE_NCOLS, 1,
- X PANEL_LABEL_STRING, "Default action:",
- X PANEL_NOTIFY_PROC, default_action,
- X PANEL_CHOICE_STRINGS,
- X "Beep",
- X "Command",
- X "Flash icon",
- X "Open window",
- X "Timestamp",
- X 0,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `default_beep_count' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_props_default_beep_count_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_NUMERIC_TEXT,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:default_beep_count",
- X XV_X, 306,
- X XV_Y, 19,
- X XV_WIDTH, 80,
- X XV_HEIGHT, 15,
- X PANEL_VALUE_X, 315,
- X PANEL_VALUE_Y, 19,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_VALUE_DISPLAY_LENGTH, 2,
- X PANEL_VALUE_STORED_LENGTH, 2,
- X PANEL_MAX_VALUE, 99,
- X PANEL_MIN_VALUE, 0,
- X PANEL_READ_ONLY, FALSE,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `default_beep_times' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_props_default_beep_times_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_MESSAGE,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:default_beep_times",
- X XV_X, 394,
- X XV_Y, 19,
- X XV_WIDTH, 34,
- X XV_HEIGHT, 13,
- X PANEL_LABEL_STRING, "times",
- X PANEL_LABEL_BOLD, FALSE,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `default_command' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_props_default_command_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_TEXT,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:default_command",
- X XV_X, 306,
- X XV_Y, 48,
- X XV_WIDTH, 177,
- X XV_HEIGHT, 15,
- X PANEL_VALUE_X, 315,
- X PANEL_VALUE_Y, 48,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_VALUE_DISPLAY_LENGTH, 21,
- X PANEL_VALUE_STORED_LENGTH, 1024,
- X PANEL_READ_ONLY, FALSE,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `log_file' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_props_log_file_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X extern Panel_setting file_completion();
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_TEXT,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:log_file",
- X XV_X, 141,
- X XV_Y, 174,
- X XV_WIDTH, 344,
- X XV_HEIGHT, 15,
- X PANEL_LABEL_STRING, "Log file:",
- X PANEL_VALUE_X, 205,
- X PANEL_VALUE_Y, 174,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_VALUE_DISPLAY_LENGTH, 35,
- X PANEL_VALUE_STORED_LENGTH, 256,
- X PANEL_READ_ONLY, FALSE,
- X PANEL_NOTIFY_PROC, file_completion,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `log_style' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_props_log_style_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_CHOICE,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:log_style",
- X XV_X, 96,
- X XV_Y, 194,
- X XV_WIDTH, 314,
- X XV_HEIGHT, 23,
- X PANEL_VALUE_X, 205,
- X PANEL_VALUE_Y, 194,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_CHOICE_NROWS, 1,
- X PANEL_LABEL_STRING, "Log messages:",
- X PANEL_CHOICE_STRINGS,
- X "Before filtering",
- X "After filtering",
- X 0,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `print_filter' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_props_print_filter_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_TEXT,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:print_filter",
- X XV_X, 119,
- X XV_Y, 237,
- X XV_WIDTH, 364,
- X XV_HEIGHT, 15,
- X PANEL_LABEL_STRING, "Print filter:",
- X PANEL_VALUE_X, 203,
- X PANEL_VALUE_Y, 237,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_VALUE_DISPLAY_LENGTH, 35,
- X PANEL_VALUE_STORED_LENGTH, 256,
- X PANEL_READ_ONLY, FALSE,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `good_icon' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_props_good_icon_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X extern Panel_setting file_completion();
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_TEXT,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:good_icon",
- X XV_X, 79,
- X XV_Y, 274,
- X XV_WIDTH, 406,
- X XV_HEIGHT, 15,
- X PANEL_LABEL_STRING, "\"All is well\" icon:",
- X PANEL_VALUE_X, 205,
- X PANEL_VALUE_Y, 274,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_VALUE_DISPLAY_LENGTH, 35,
- X PANEL_VALUE_STORED_LENGTH, 256,
- X PANEL_READ_ONLY, FALSE,
- X PANEL_NOTIFY_PROC, file_completion,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `bad_icon' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_props_bad_icon_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X extern Panel_setting file_completion();
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_TEXT,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:bad_icon",
- X XV_X, 50,
- X XV_Y, 294,
- X XV_WIDTH, 435,
- X XV_HEIGHT, 15,
- X PANEL_LABEL_STRING, "\"Check console\" icon:",
- X PANEL_VALUE_X, 205,
- X PANEL_VALUE_Y, 294,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_VALUE_DISPLAY_LENGTH, 35,
- X PANEL_VALUE_STORED_LENGTH, 256,
- X PANEL_READ_ONLY, FALSE,
- X PANEL_NOTIFY_PROC, file_completion,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `flash_icon' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_props_flash_icon_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X extern Panel_setting file_completion();
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_TEXT,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:flash_icon",
- X XV_X, 111,
- X XV_Y, 314,
- X XV_WIDTH, 374,
- X XV_HEIGHT, 15,
- X PANEL_LABEL_STRING, "\"Flash\" icon:",
- X PANEL_VALUE_X, 205,
- X PANEL_VALUE_Y, 314,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_VALUE_DISPLAY_LENGTH, 35,
- X PANEL_VALUE_STORED_LENGTH, 256,
- X PANEL_READ_ONLY, FALSE,
- X PANEL_NOTIFY_PROC, file_completion,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `stamp_resolution' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_props_stamp_resolution_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_NUMERIC_TEXT,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:stamp_resolution",
- X XV_X, 40,
- X XV_Y, 350,
- X XV_WIDTH, 246,
- X XV_HEIGHT, 15,
- X PANEL_LABEL_STRING, "Timestamp resolution:",
- X PANEL_VALUE_X, 205,
- X PANEL_VALUE_Y, 350,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_VALUE_DISPLAY_LENGTH, 6,
- X PANEL_VALUE_STORED_LENGTH, 6,
- X PANEL_MAX_VALUE, 999,
- X PANEL_MIN_VALUE, 0,
- X PANEL_READ_ONLY, FALSE,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `message2' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_props_message2_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_MESSAGE,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:message2",
- X XV_X, 296,
- X XV_Y, 350,
- X XV_WIDTH, 48,
- X XV_HEIGHT, 13,
- X PANEL_LABEL_STRING, "seconds",
- X PANEL_LABEL_BOLD, FALSE,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `max_message' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_props_max_message_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_NUMERIC_TEXT,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:max_message",
- X XV_X, 32,
- X XV_Y, 386,
- X XV_WIDTH, 254,
- X XV_HEIGHT, 15,
- X PANEL_LABEL_STRING, "Maximum message text:",
- X PANEL_VALUE_X, 205,
- X PANEL_VALUE_Y, 386,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_VALUE_DISPLAY_LENGTH, 6,
- X PANEL_VALUE_STORED_LENGTH, 6,
- X PANEL_MAX_VALUE, 999999,
- X PANEL_MIN_VALUE, 0,
- X PANEL_READ_ONLY, FALSE,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `message3' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_props_message3_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_MESSAGE,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:message3",
- X XV_X, 295,
- X XV_Y, 386,
- X XV_WIDTH, 33,
- X XV_HEIGHT, 13,
- X PANEL_LABEL_STRING, "bytes",
- X PANEL_LABEL_BOLD, FALSE,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `delete_amount' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_props_delete_amount_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_NUMERIC_TEXT,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:delete_amount",
- X XV_X, 14,
- X XV_Y, 406,
- X XV_WIDTH, 272,
- X XV_HEIGHT, 15,
- X PANEL_LABEL_STRING, "Overflow deletion amount:",
- X PANEL_VALUE_X, 205,
- X PANEL_VALUE_Y, 406,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_VALUE_DISPLAY_LENGTH, 6,
- X PANEL_VALUE_STORED_LENGTH, 6,
- X PANEL_MAX_VALUE, 999999,
- X PANEL_MIN_VALUE, 0,
- X PANEL_READ_ONLY, FALSE,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `message4' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_props_message4_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_MESSAGE,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:message4",
- X XV_X, 295,
- X XV_Y, 406,
- X XV_WIDTH, 33,
- X XV_HEIGHT, 13,
- X PANEL_LABEL_STRING, "bytes",
- X PANEL_LABEL_BOLD, FALSE,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `props_apply' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_props_props_apply_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X extern void accept_properties();
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_BUTTON,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:props_apply",
- X XV_X, 191,
- X XV_Y, 442,
- X XV_WIDTH, 53,
- X XV_HEIGHT, 20,
- X PANEL_LABEL_STRING, "Apply",
- X PANEL_NOTIFY_PROC, accept_properties,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `props_reset' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_props_props_reset_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X extern void reset_properties();
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_BUTTON,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:props_reset",
- X XV_X, 256,
- X XV_Y, 442,
- X XV_WIDTH, 51,
- X XV_HEIGHT, 20,
- X PANEL_LABEL_STRING, "Reset",
- X PANEL_NOTIFY_PROC, reset_properties,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Initialize an instance of object `filters'.
- X */
- Xcontool_filters_objects *
- Xcontool_filters_objects_initialize(ip, owner)
- X contool_filters_objects *ip;
- X Xv_opaque owner;
- X{
- X if (!ip && !(ip = (contool_filters_objects *) calloc(1, sizeof (contool_filters_objects))))
- X return (contool_filters_objects *) NULL;
- X if (!ip->filters)
- X ip->filters = contool_filters_filters_create(ip, owner);
- X if (!ip->filter_controls)
- X ip->filter_controls = contool_filters_filter_controls_create(ip, ip->filters);
- X if (!ip->filter_list)
- X ip->filter_list = contool_filters_filter_list_create(ip, ip->filter_controls);
- X if (!ip->filter_insert)
- X ip->filter_insert = contool_filters_filter_insert_create(ip, ip->filter_controls);
- X if (!ip->filter_edit)
- X ip->filter_edit = contool_filters_filter_edit_create(ip, ip->filter_controls);
- X if (!ip->filter_update)
- X ip->filter_update = contool_filters_filter_update_create(ip, ip->filter_controls);
- X if (!ip->filter_type)
- X ip->filter_type = contool_filters_filter_type_create(ip, ip->filter_controls);
- X if (!ip->start)
- X ip->start = contool_filters_start_create(ip, ip->filter_controls);
- X if (!ip->stop)
- X ip->stop = contool_filters_stop_create(ip, ip->filter_controls);
- X if (!ip->comment)
- X ip->comment = contool_filters_comment_create(ip, ip->filter_controls);
- X if (!ip->ignore)
- X ip->ignore = contool_filters_ignore_create(ip, ip->filter_controls);
- X if (!ip->action)
- X ip->action = contool_filters_action_create(ip, ip->filter_controls);
- X if (!ip->filter_beep_count)
- X ip->filter_beep_count = contool_filters_filter_beep_count_create(ip, ip->filter_controls);
- X if (!ip->filter_beep_times)
- X ip->filter_beep_times = contool_filters_filter_beep_times_create(ip, ip->filter_controls);
- X if (!ip->filter_command)
- X ip->filter_command = contool_filters_filter_command_create(ip, ip->filter_controls);
- X if (!ip->filters_apply)
- X ip->filters_apply = contool_filters_filters_apply_create(ip, ip->filter_controls);
- X if (!ip->filters_reset)
- X ip->filters_reset = contool_filters_filters_reset_create(ip, ip->filter_controls);
- X return ip;
- X}
- X
- X/*
- X * Create object `filters' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_filters_filters_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X extern void filter_done();
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, FRAME_CMD,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_WIDTH, 510,
- X XV_HEIGHT, 620,
- X XV_LABEL, "Contool: Filters",
- X XV_SHOW, FALSE,
- X FRAME_SHOW_FOOTER, FALSE,
- X FRAME_SHOW_RESIZE_CORNER, FALSE,
- X FRAME_CMD_PUSHPIN_IN, FALSE,
- X FRAME_DONE_PROC, filter_done,
- X NULL);
- X xv_set(xv_get(obj, FRAME_CMD_PANEL), WIN_SHOW, FALSE, NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `filter_controls' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_filters_filter_controls_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:filter_controls",
- X XV_X, 0,
- X XV_Y, 0,
- X XV_WIDTH, WIN_EXTEND_TO_EDGE,
- X XV_HEIGHT, WIN_EXTEND_TO_EDGE,
- X WIN_BORDER, FALSE,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `filter_list' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_filters_filter_list_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X extern int filter_notify();
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_LIST,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:filter_list",
- X XV_X, 70,
- X XV_Y, 14,
- X PANEL_LIST_WIDTH, 350,
- X XV_HEIGHT, 200,
- X PANEL_LABEL_STRING, "Filters:",
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_LIST_DISPLAY_ROWS, 10,
- X PANEL_READ_ONLY, TRUE,
- X PANEL_CHOOSE_ONE, FALSE,
- X PANEL_CHOOSE_NONE, TRUE,
- X PANEL_NOTIFY_PROC, filter_notify,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `filter_insert' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_filters_filter_insert_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_BUTTON,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:filter_insert",
- X XV_X, 126,
- X XV_Y, 218,
- X XV_WIDTH, 67,
- X XV_HEIGHT, 20,
- X PANEL_LABEL_STRING, "Insert",
- X PANEL_ITEM_MENU, contool_filter_insert_menu_create((caddr_t *) ip, NULL),
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `filter_edit' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_filters_filter_edit_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_BUTTON,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:filter_edit",
- X XV_X, 202,
- X XV_Y, 218,
- X XV_WIDTH, 56,
- X XV_HEIGHT, 20,
- X PANEL_LABEL_STRING, "Edit",
- X PANEL_ITEM_MENU, contool_filter_edit_menu_create((caddr_t *) ip, NULL),
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `filter_update' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_filters_filter_update_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X extern void filter_update();
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_BUTTON,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:filter_update",
- X XV_X, 267,
- X XV_Y, 218,
- X XV_WIDTH, 62,
- X XV_HEIGHT, 20,
- X PANEL_LABEL_STRING, "Update",
- X PANEL_NOTIFY_PROC, filter_update,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `filter_type' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_filters_filter_type_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X extern int set_filter_type();
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_CHOICE,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:filter_type",
- X XV_X, 80,
- X XV_Y, 259,
- X XV_WIDTH, 272,
- X XV_HEIGHT, 23,
- X PANEL_VALUE_X, 126,
- X PANEL_VALUE_Y, 259,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_CHOICE_NROWS, 1,
- X PANEL_LABEL_STRING, "Type:",
- X PANEL_NOTIFY_PROC, set_filter_type,
- X PANEL_CHOICE_STRINGS,
- X "Single line filter",
- X "Multi-line filter",
- X 0,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `start' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_filters_start_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_TEXT,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:start",
- X XV_X, 65,
- X XV_Y, 303,
- X XV_WIDTH, 429,
- X XV_HEIGHT, 15,
- X PANEL_LABEL_STRING, "Pattern:",
- X PANEL_VALUE_X, 126,
- X PANEL_VALUE_Y, 303,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_VALUE_DISPLAY_LENGTH, 46,
- X PANEL_VALUE_STORED_LENGTH, 256,
- X PANEL_READ_ONLY, FALSE,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `stop' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_filters_stop_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_TEXT,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:stop",
- X XV_X, 35,
- X XV_Y, 323,
- X XV_WIDTH, 459,
- X XV_HEIGHT, 15,
- X PANEL_LABEL_STRING, "End pattern:",
- X PANEL_VALUE_X, 126,
- X PANEL_VALUE_Y, 323,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_VALUE_DISPLAY_LENGTH, 46,
- X PANEL_VALUE_STORED_LENGTH, 256,
- X PANEL_READ_ONLY, FALSE,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `comment' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_filters_comment_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_TEXT,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:comment",
- X XV_X, 49,
- X XV_Y, 359,
- X XV_WIDTH, 445,
- X XV_HEIGHT, 15,
- X PANEL_LABEL_STRING, "Comment:",
- X PANEL_VALUE_X, 126,
- X PANEL_VALUE_Y, 359,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_VALUE_DISPLAY_LENGTH, 46,
- X PANEL_VALUE_STORED_LENGTH, 256,
- X PANEL_READ_ONLY, FALSE,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `ignore' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_filters_ignore_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X extern int set_filter_action();
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_CHOICE,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:ignore",
- X XV_X, 14,
- X XV_Y, 395,
- X XV_WIDTH, 321,
- X XV_HEIGHT, 23,
- X PANEL_VALUE_X, 126,
- X PANEL_VALUE_Y, 395,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_CHOICE_NROWS, 1,
- X PANEL_LABEL_STRING, "When matched:",
- X PANEL_NOTIFY_PROC, set_filter_action,
- X PANEL_CHOICE_STRINGS,
- X "Save message",
- X "Ignore message",
- X 0,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `action' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_filters_action_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X extern int set_match_action();
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_TOGGLE,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:action",
- X XV_X, 32,
- X XV_Y, 423,
- X XV_WIDTH, 196,
- X XV_HEIGHT, 139,
- X PANEL_VALUE_X, 126,
- X PANEL_VALUE_Y, 423,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_CHOICE_NCOLS, 1,
- X PANEL_LABEL_STRING, "When saved:",
- X PANEL_NOTIFY_PROC, set_match_action,
- X PANEL_CHOICE_STRINGS,
- X "Beep",
- X "Command",
- X "Flash icon",
- X "Open window",
- X "Timestamp",
- X 0,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `filter_beep_count' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_filters_filter_beep_count_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_NUMERIC_TEXT,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:filter_beep_count",
- X XV_X, 228,
- X XV_Y, 428,
- X XV_WIDTH, 80,
- X XV_HEIGHT, 15,
- X PANEL_VALUE_X, 237,
- X PANEL_VALUE_Y, 428,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_VALUE_DISPLAY_LENGTH, 2,
- X PANEL_VALUE_STORED_LENGTH, 2,
- X PANEL_MAX_VALUE, 99,
- X PANEL_MIN_VALUE, 0,
- X PANEL_READ_ONLY, FALSE,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `filter_beep_times' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_filters_filter_beep_times_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_MESSAGE,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:filter_beep_times",
- X XV_X, 316,
- X XV_Y, 428,
- X XV_WIDTH, 34,
- X XV_HEIGHT, 13,
- X PANEL_LABEL_STRING, "times",
- X PANEL_LABEL_BOLD, FALSE,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `filter_command' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_filters_filter_command_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_TEXT,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:filter_command",
- X XV_X, 228,
- X XV_Y, 457,
- X XV_WIDTH, 265,
- X XV_HEIGHT, 15,
- X PANEL_VALUE_X, 237,
- X PANEL_VALUE_Y, 457,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_VALUE_DISPLAY_LENGTH, 32,
- X PANEL_VALUE_STORED_LENGTH, 1024,
- X PANEL_READ_ONLY, FALSE,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `filters_apply' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_filters_filters_apply_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X extern void accept_filters();
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_BUTTON,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:filters_apply",
- X XV_X, 196,
- X XV_Y, 583,
- X XV_WIDTH, 53,
- X XV_HEIGHT, 20,
- X PANEL_LABEL_STRING, "Apply",
- X PANEL_NOTIFY_PROC, accept_filters,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `filters_reset' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_filters_filters_reset_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X extern void reset_filters();
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_BUTTON,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:filters_reset",
- X XV_X, 261,
- X XV_Y, 583,
- X XV_WIDTH, 51,
- X XV_HEIGHT, 20,
- X PANEL_LABEL_STRING, "Reset",
- X PANEL_NOTIFY_PROC, reset_filters,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Initialize an instance of object `load'.
- X */
- Xcontool_load_objects *
- Xcontool_load_objects_initialize(ip, owner)
- X contool_load_objects *ip;
- X Xv_opaque owner;
- X{
- X if (!ip && !(ip = (contool_load_objects *) calloc(1, sizeof (contool_load_objects))))
- X return (contool_load_objects *) NULL;
- X if (!ip->load)
- X ip->load = contool_load_load_create(ip, owner);
- X if (!ip->load_controls)
- X ip->load_controls = contool_load_load_controls_create(ip, ip->load);
- X if (!ip->load_type)
- X ip->load_type = contool_load_load_type_create(ip, ip->load_controls);
- X if (!ip->load_file)
- X ip->load_file = contool_load_load_file_create(ip, ip->load_controls);
- X if (!ip->accept_load)
- X ip->accept_load = contool_load_accept_load_create(ip, ip->load_controls);
- X return ip;
- X}
- X
- X/*
- X * Create object `load' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_load_load_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, FRAME_CMD,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_WIDTH, 444,
- X XV_HEIGHT, 146,
- X XV_LABEL, "Contool: Load Configuration",
- X XV_SHOW, FALSE,
- X FRAME_SHOW_FOOTER, FALSE,
- X FRAME_SHOW_RESIZE_CORNER, FALSE,
- X FRAME_CMD_PUSHPIN_IN, FALSE,
- X NULL);
- X xv_set(xv_get(obj, FRAME_CMD_PANEL), WIN_SHOW, FALSE, NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `load_controls' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_load_load_controls_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:load_controls",
- X XV_X, 0,
- X XV_Y, 0,
- X XV_WIDTH, WIN_EXTEND_TO_EDGE,
- X XV_HEIGHT, WIN_EXTEND_TO_EDGE,
- X WIN_BORDER, FALSE,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `load_type' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_load_load_type_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_TOGGLE,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:load_type",
- X XV_X, 105,
- X XV_Y, 14,
- X XV_WIDTH, 162,
- X XV_HEIGHT, 52,
- X PANEL_VALUE_X, 149,
- X PANEL_VALUE_Y, 14,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_CHOICE_NCOLS, 1,
- X PANEL_LABEL_STRING, "Load:",
- X PANEL_CHOICE_STRINGS,
- X "Tool properties",
- X "Filter definitions",
- X 0,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `load_file' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_load_load_file_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X extern Panel_setting file_completion();
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_TEXT,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:load_file",
- X XV_X, 14,
- X XV_Y, 72,
- X XV_WIDTH, 415,
- X XV_HEIGHT, 15,
- X PANEL_LABEL_STRING, "Configuration file:",
- X PANEL_VALUE_X, 149,
- X PANEL_VALUE_Y, 72,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_VALUE_DISPLAY_LENGTH, 35,
- X PANEL_VALUE_STORED_LENGTH, 256,
- X PANEL_READ_ONLY, FALSE,
- X PANEL_NOTIFY_PROC, file_completion,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `accept_load' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_load_accept_load_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X extern void load_filters();
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_BUTTON,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:accept_load",
- X XV_X, 199,
- X XV_Y, 107,
- X XV_WIDTH, 46,
- X XV_HEIGHT, 20,
- X PANEL_LABEL_STRING, "Load",
- X PANEL_NOTIFY_PROC, load_filters,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Initialize an instance of object `store'.
- X */
- Xcontool_store_objects *
- Xcontool_store_objects_initialize(ip, owner)
- X contool_store_objects *ip;
- X Xv_opaque owner;
- X{
- X if (!ip && !(ip = (contool_store_objects *) calloc(1, sizeof (contool_store_objects))))
- X return (contool_store_objects *) NULL;
- X if (!ip->store)
- X ip->store = contool_store_store_create(ip, owner);
- X if (!ip->store_controls)
- X ip->store_controls = contool_store_store_controls_create(ip, ip->store);
- X if (!ip->store_type)
- X ip->store_type = contool_store_store_type_create(ip, ip->store_controls);
- X if (!ip->store_file)
- X ip->store_file = contool_store_store_file_create(ip, ip->store_controls);
- X if (!ip->accept_store)
- X ip->accept_store = contool_store_accept_store_create(ip, ip->store_controls);
- X return ip;
- X}
- X
- X/*
- X * Create object `store' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_store_store_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, FRAME_CMD,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_WIDTH, 444,
- X XV_HEIGHT, 146,
- X XV_LABEL, "Contool: Store Configuration",
- X XV_SHOW, FALSE,
- X FRAME_SHOW_FOOTER, FALSE,
- X FRAME_SHOW_RESIZE_CORNER, FALSE,
- X FRAME_CMD_PUSHPIN_IN, FALSE,
- X NULL);
- X xv_set(xv_get(obj, FRAME_CMD_PANEL), WIN_SHOW, FALSE, NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `store_controls' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_store_store_controls_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:store_controls",
- X XV_X, 0,
- X XV_Y, 0,
- X XV_WIDTH, WIN_EXTEND_TO_EDGE,
- X XV_HEIGHT, WIN_EXTEND_TO_EDGE,
- X WIN_BORDER, FALSE,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `store_type' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_store_store_type_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_TOGGLE,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:store_type",
- X XV_X, 102,
- X XV_Y, 14,
- X XV_WIDTH, 165,
- X XV_HEIGHT, 52,
- X PANEL_VALUE_X, 149,
- X PANEL_VALUE_Y, 14,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_CHOICE_NCOLS, 1,
- X PANEL_LABEL_STRING, "Store:",
- X PANEL_CHOICE_STRINGS,
- X "Tool properties",
- X "Filter definitions",
- X 0,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `store_file' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_store_store_file_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X extern Panel_setting file_completion();
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_TEXT,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:store_file",
- X XV_X, 14,
- X XV_Y, 72,
- X XV_WIDTH, 415,
- X XV_HEIGHT, 15,
- X PANEL_LABEL_STRING, "Configuration file:",
- X PANEL_VALUE_X, 149,
- X PANEL_VALUE_Y, 72,
- X PANEL_LAYOUT, PANEL_HORIZONTAL,
- X PANEL_VALUE_DISPLAY_LENGTH, 35,
- X PANEL_VALUE_STORED_LENGTH, 256,
- X PANEL_READ_ONLY, FALSE,
- X PANEL_NOTIFY_PROC, file_completion,
- X NULL);
- X return obj;
- X}
- X
- X/*
- X * Create object `accept_store' in the specified instance.
- X
- X */
- XXv_opaque
- Xcontool_store_accept_store_create(ip, owner)
- X caddr_t ip;
- X Xv_opaque owner;
- X{
- X extern void store_filters();
- X Xv_opaque obj;
- X
- X obj = xv_create(owner, PANEL_BUTTON,
- X XV_KEY_DATA, INSTANCE, ip,
- X XV_HELP_DATA, "contool:accept_store",
- X XV_X, 197,
- X XV_Y, 107,
- X XV_WIDTH, 49,
- X XV_HEIGHT, 20,
- X PANEL_LABEL_STRING, "Store",
- X PANEL_NOTIFY_PROC, store_filters,
- X NULL);
- X return obj;
- X}
- X
- END_OF_FILE
- if test 40450 -ne `wc -c <'contool_ui.c'`; then
- echo shar: \"'contool_ui.c'\" unpacked with wrong size!
- fi
- # end of 'contool_ui.c'
- fi
- echo shar: End of archive 6 \(of 6\).
- cp /dev/null ark6isdone
- MISSING=""
- for I in 1 2 3 4 5 6 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 6 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-
- Chuck Musciano ARPA : chuck@trantor.harris-atd.com
- Harris Corporation Usenet: ...!uunet!x102a!trantor!chuck
- PO Box 37, MS 3A/1912 AT&T : (407) 727-6131
- Melbourne, FL 32902 FAX : (407) 727-{5118,5227,4004}
-
- I'm glad you asked, son. Being popular
- is the most important thing in the world. -- Homer Simpson
-